Make NS port use the normal dnd functions.
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 19 Dec 2013 10:25:48 +0000 (11:25 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 19 Dec 2013 10:25:48 +0000 (11:25 +0100)
commit19b397d13370cf9f8d014afd8af5975f938fec44
tree85e54eeb584c135f1f6d454cab222c5e58134eab
parentd04b9db54b3c7c9db90158779fc39be76cd0c9fb
Make NS port use the normal dnd functions.

* lisp/term/ns-win.el: Require dnd.
(global-map): Remove drag items.
(ns-insert-text, ns-set-foreground-at-mouse)
(ns-set-background-at-mouse): Remove
(ns-drag-n-drop, ns-drag-n-drop-other-frame)
(ns-drag-n-drop-as-text, ns-drag-n-drop-as-text-other-frame): New
functions.

* src/nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
Remove.

* src/nsterm.m (Qfile, Qurl): New.
(EV_MODIFIERS2): New macro.
(EV_MODIFIERS): Use EV_MODIFIERS2.
(ns_term_init): Remove font and color from DND, does not work on
newer OSX, and other ports don't have them.
(performDragOperation:): Handle modifiers used during drag.
Use DRAG_N_DROP_EVENT instead of NS specific events.
Remove global Lisp variables used to communicate with ns-win.el.
Remove font and color handling.
(syms_of_nsterm): Defsym Qfile and Qurl.
lisp/ChangeLog
lisp/term/ns-win.el
src/ChangeLog
src/nsterm.h
src/nsterm.m